package com.retail.order.mapper;

import com.retail.core.common.CommonMapper;
import com.retail.order.entity.request.SysAdminVerifyDetailRequest;
import com.retail.order.entity.vo.SysAdminVerifyDetailVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* 用户核销单子明细 Mapper
* @author Administrator
*/
@Mapper
public interface SysAdminVerifyDetailMapper extends CommonMapper<SysAdminVerifyDetailRequest, SysAdminVerifyDetailVo> {
    SysAdminVerifyDetailVo getMaxModelByOrderId(@Param("adminId") String adminId, @Param("orderId") String orderId);

    List<SysAdminVerifyDetailVo> findModelByVerifyId(@Param("verifyId") Long verifyId);

    /**
     * 根据用户卡项判断数据是否存在
     * @param adminId
     * @param objectId
     * @param verifyType
     * @return
     */
    SysAdminVerifyDetailVo getUseAdminVerifyDetailByObjectIdAndVerifyType(@Param("adminId") Long adminId, @Param("objectId") Long objectId, @Param("verifyType") Integer verifyType);

    /**
     * 删除数据（真删除）
     * @param id
     * @return
     */
    Integer realDeleteById(@Param("id") Long id);

    Integer realDeleteByVerifyId(@Param("verifyId") Long verifyId);

    List<SysAdminVerifyDetailVo> findModelByMonthOrders(@Param("adminId") Long adminId, @Param("verifyYear") String verifyYear);
}
